package com.wanxi.object;

public class Student {
    public String name;
    public int age;

    public Student() {
        System.out.println("构造方法");
    }

    //    代码块
    {
        System.out.println("代码块");

    }
    static {
        System.out.println("静态代码块");
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Student(int age) {
        this.age = age;
    }

    public void sayHello(String name) {
        System.out.println(name);
    }

    public void sayHelloA(String name) {
        System.out.println(this + "*************");
        System.out.println(this.name);
    }
}
